import 'package:flutter_novel/generated/json/base/json_convert_content.dart';
import 'package:flutter_novel/series_list/data/model/cartoon_model_entity.dart';

CartoonModelData $CartoonModelDataFromJson(Map<String, dynamic> json) {
	final CartoonModelData cartoonModelData = CartoonModelData();
	final List<CartoonModelDataFeeds>? feeds = jsonConvert.convertListNotNull<CartoonModelDataFeeds>(json['feeds']);
	if (feeds != null) {
		cartoonModelData.feeds = feeds;
	}
	final int? showTimes = jsonConvert.convert<int>(json['show_times']);
	if (showTimes != null) {
		cartoonModelData.showTimes = showTimes;
	}
	return cartoonModelData;
}

Map<String, dynamic> $CartoonModelDataToJson(CartoonModelData entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['feeds'] =  entity.feeds?.map((v) => v.toJson()).toList();
	data['show_times'] = entity.showTimes;
	return data;
}

CartoonModelDataFeeds $CartoonModelDataFeedsFromJson(Map<String, dynamic> json) {
	final CartoonModelDataFeeds cartoonModelDataFeeds = CartoonModelDataFeeds();
	final String? itemId = jsonConvert.convert<String>(json['item_id']);
	if (itemId != null) {
		cartoonModelDataFeeds.itemId = itemId;
	}
	final String? parentId = jsonConvert.convert<String>(json['parent_id']);
	if (parentId != null) {
		cartoonModelDataFeeds.parentId = parentId;
	}
	final String? title = jsonConvert.convert<String>(json['title']);
	if (title != null) {
		cartoonModelDataFeeds.title = title;
	}
	final String? jumpValue = jsonConvert.convert<String>(json['jump_value']);
	if (jumpValue != null) {
		cartoonModelDataFeeds.jumpValue = jumpValue;
	}
	final int? type = jsonConvert.convert<int>(json['type']);
	if (type != null) {
		cartoonModelDataFeeds.type = type;
	}
	final String? image = jsonConvert.convert<String>(json['image']);
	if (image != null) {
		cartoonModelDataFeeds.image = image;
	}
	final CartoonModelDataFeedsIcons? icons = jsonConvert.convert<CartoonModelDataFeedsIcons>(json['icons']);
	if (icons != null) {
		cartoonModelDataFeeds.icons = icons;
	}
	final CartoonModelDataFeedsDescription? description = jsonConvert.convert<CartoonModelDataFeedsDescription>(json['description']);
	if (description != null) {
		cartoonModelDataFeeds.description = description;
	}
	final CartoonModelDataFeedsShop? shop = jsonConvert.convert<CartoonModelDataFeedsShop>(json['shop']);
	if (shop != null) {
		cartoonModelDataFeeds.shop = shop;
	}
	final CartoonModelDataFeedsComicInfo? comicInfo = jsonConvert.convert<CartoonModelDataFeedsComicInfo>(json['comic_info']);
	if (comicInfo != null) {
		cartoonModelDataFeeds.comicInfo = comicInfo;
	}
	final List<CartoonModelDataFeedsLabels>? labels = jsonConvert.convertListNotNull<CartoonModelDataFeedsLabels>(json['labels']);
	if (labels != null) {
		cartoonModelDataFeeds.labels = labels;
	}
	final CartoonModelDataFeedsCombine? combine = jsonConvert.convert<CartoonModelDataFeedsCombine>(json['combine']);
	if (combine != null) {
		cartoonModelDataFeeds.combine = combine;
	}
	final CartoonModelDataFeedsRank? rank = jsonConvert.convert<CartoonModelDataFeedsRank>(json['rank']);
	if (rank != null) {
		cartoonModelDataFeeds.rank = rank;
	}
	final CartoonModelDataFeedsIpProduct? ipProduct = jsonConvert.convert<CartoonModelDataFeedsIpProduct>(json['ip_product']);
	if (ipProduct != null) {
		cartoonModelDataFeeds.ipProduct = ipProduct;
	}
	final CartoonModelDataFeedsNovelInfo? novelInfo = jsonConvert.convert<CartoonModelDataFeedsNovelInfo>(json['novel_info']);
	if (novelInfo != null) {
		cartoonModelDataFeeds.novelInfo = novelInfo;
	}
	final bool? isLike = jsonConvert.convert<bool>(json['isLike']);
	if (isLike != null) {
		cartoonModelDataFeeds.isLike = isLike;
	}
	return cartoonModelDataFeeds;
}

Map<String, dynamic> $CartoonModelDataFeedsToJson(CartoonModelDataFeeds entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['item_id'] = entity.itemId;
	data['parent_id'] = entity.parentId;
	data['title'] = entity.title;
	data['jump_value'] = entity.jumpValue;
	data['type'] = entity.type;
	data['image'] = entity.image;
	data['icons'] = entity.icons?.toJson();
	data['description'] = entity.description?.toJson();
	data['shop'] = entity.shop?.toJson();
	data['comic_info'] = entity.comicInfo?.toJson();
	data['labels'] =  entity.labels?.map((v) => v.toJson()).toList();
	data['combine'] = entity.combine?.toJson();
	data['rank'] = entity.rank?.toJson();
	data['ip_product'] = entity.ipProduct?.toJson();
	data['novel_info'] = entity.novelInfo?.toJson();
	data['isLike'] = entity.isLike;
	return data;
}

CartoonModelDataFeedsIcons $CartoonModelDataFeedsIconsFromJson(Map<String, dynamic> json) {
	final CartoonModelDataFeedsIcons cartoonModelDataFeedsIcons = CartoonModelDataFeedsIcons();
	final bool? allowWaitFree = jsonConvert.convert<bool>(json['allow_wait_free']);
	if (allowWaitFree != null) {
		cartoonModelDataFeedsIcons.allowWaitFree = allowWaitFree;
	}
	final int? discountType = jsonConvert.convert<int>(json['discount_type']);
	if (discountType != null) {
		cartoonModelDataFeedsIcons.discountType = discountType;
	}
	final int? singleIcon = jsonConvert.convert<int>(json['single_icon']);
	if (singleIcon != null) {
		cartoonModelDataFeedsIcons.singleIcon = singleIcon;
	}
	final int? doubleIcon = jsonConvert.convert<int>(json['double_icon']);
	if (doubleIcon != null) {
		cartoonModelDataFeedsIcons.doubleIcon = doubleIcon;
	}
	final bool? newComic = jsonConvert.convert<bool>(json['new_comic']);
	if (newComic != null) {
		cartoonModelDataFeedsIcons.newComic = newComic;
	}
	return cartoonModelDataFeedsIcons;
}

Map<String, dynamic> $CartoonModelDataFeedsIconsToJson(CartoonModelDataFeedsIcons entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['allow_wait_free'] = entity.allowWaitFree;
	data['discount_type'] = entity.discountType;
	data['single_icon'] = entity.singleIcon;
	data['double_icon'] = entity.doubleIcon;
	data['new_comic'] = entity.newComic;
	return data;
}

CartoonModelDataFeedsDescription $CartoonModelDataFeedsDescriptionFromJson(Map<String, dynamic> json) {
	final CartoonModelDataFeedsDescription cartoonModelDataFeedsDescription = CartoonModelDataFeedsDescription();
	final String? description = jsonConvert.convert<String>(json['description']);
	if (description != null) {
		cartoonModelDataFeedsDescription.description = description;
	}
	final String? ext = jsonConvert.convert<String>(json['ext']);
	if (ext != null) {
		cartoonModelDataFeedsDescription.ext = ext;
	}
	return cartoonModelDataFeedsDescription;
}

Map<String, dynamic> $CartoonModelDataFeedsDescriptionToJson(CartoonModelDataFeedsDescription entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['description'] = entity.description;
	data['ext'] = entity.ext;
	return data;
}

CartoonModelDataFeedsShop $CartoonModelDataFeedsShopFromJson(Map<String, dynamic> json) {
	final CartoonModelDataFeedsShop cartoonModelDataFeedsShop = CartoonModelDataFeedsShop();
	final int? price = jsonConvert.convert<int>(json['price']);
	if (price != null) {
		cartoonModelDataFeedsShop.price = price;
	}
	final int? depositPrice = jsonConvert.convert<int>(json['deposit_price']);
	if (depositPrice != null) {
		cartoonModelDataFeedsShop.depositPrice = depositPrice;
	}
	final int? wishCount = jsonConvert.convert<int>(json['wish_count']);
	if (wishCount != null) {
		cartoonModelDataFeedsShop.wishCount = wishCount;
	}
	return cartoonModelDataFeedsShop;
}

Map<String, dynamic> $CartoonModelDataFeedsShopToJson(CartoonModelDataFeedsShop entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['price'] = entity.price;
	data['deposit_price'] = entity.depositPrice;
	data['wish_count'] = entity.wishCount;
	return data;
}

CartoonModelDataFeedsComicInfo $CartoonModelDataFeedsComicInfoFromJson(Map<String, dynamic> json) {
	final CartoonModelDataFeedsComicInfo cartoonModelDataFeedsComicInfo = CartoonModelDataFeedsComicInfo();
	final String? decision = jsonConvert.convert<String>(json['decision']);
	if (decision != null) {
		cartoonModelDataFeedsComicInfo.decision = decision;
	}
	final String? lastestShortTitle = jsonConvert.convert<String>(json['lastest_short_title']);
	if (lastestShortTitle != null) {
		cartoonModelDataFeedsComicInfo.lastestShortTitle = lastestShortTitle;
	}
	final int? isFinish = jsonConvert.convert<int>(json['is_finish']);
	if (isFinish != null) {
		cartoonModelDataFeedsComicInfo.isFinish = isFinish;
	}
	final String? mainStyleName = jsonConvert.convert<String>(json['main_style_name']);
	if (mainStyleName != null) {
		cartoonModelDataFeedsComicInfo.mainStyleName = mainStyleName;
	}
	final CartoonModelDataFeedsComicInfoRankInfo? rankInfo = jsonConvert.convert<CartoonModelDataFeedsComicInfoRankInfo>(json['rank_info']);
	if (rankInfo != null) {
		cartoonModelDataFeedsComicInfo.rankInfo = rankInfo;
	}
	final double? score = jsonConvert.convert<double>(json['score']);
	if (score != null) {
		cartoonModelDataFeedsComicInfo.score = score;
	}
	final List<String>? styles = jsonConvert.convertListNotNull<String>(json['styles']);
	if (styles != null) {
		cartoonModelDataFeedsComicInfo.styles = styles;
	}
	final List<String>? tags = jsonConvert.convertListNotNull<String>(json['tags']);
	if (tags != null) {
		cartoonModelDataFeedsComicInfo.tags = tags;
	}
	return cartoonModelDataFeedsComicInfo;
}

Map<String, dynamic> $CartoonModelDataFeedsComicInfoToJson(CartoonModelDataFeedsComicInfo entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['decision'] = entity.decision;
	data['lastest_short_title'] = entity.lastestShortTitle;
	data['is_finish'] = entity.isFinish;
	data['main_style_name'] = entity.mainStyleName;
	data['rank_info'] = entity.rankInfo?.toJson();
	data['score'] = entity.score;
	data['styles'] =  entity.styles;
	data['tags'] =  entity.tags;
	return data;
}

CartoonModelDataFeedsComicInfoRankInfo $CartoonModelDataFeedsComicInfoRankInfoFromJson(Map<String, dynamic> json) {
	final CartoonModelDataFeedsComicInfoRankInfo cartoonModelDataFeedsComicInfoRankInfo = CartoonModelDataFeedsComicInfoRankInfo();
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		cartoonModelDataFeedsComicInfoRankInfo.name = name;
	}
	final int? rank = jsonConvert.convert<int>(json['rank']);
	if (rank != null) {
		cartoonModelDataFeedsComicInfoRankInfo.rank = rank;
	}
	return cartoonModelDataFeedsComicInfoRankInfo;
}

Map<String, dynamic> $CartoonModelDataFeedsComicInfoRankInfoToJson(CartoonModelDataFeedsComicInfoRankInfo entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['name'] = entity.name;
	data['rank'] = entity.rank;
	return data;
}

CartoonModelDataFeedsLabels $CartoonModelDataFeedsLabelsFromJson(Map<String, dynamic> json) {
	final CartoonModelDataFeedsLabels cartoonModelDataFeedsLabels = CartoonModelDataFeedsLabels();
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		cartoonModelDataFeedsLabels.id = id;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		cartoonModelDataFeedsLabels.name = name;
	}
	return cartoonModelDataFeedsLabels;
}

Map<String, dynamic> $CartoonModelDataFeedsLabelsToJson(CartoonModelDataFeedsLabels entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['name'] = entity.name;
	return data;
}

CartoonModelDataFeedsCombine $CartoonModelDataFeedsCombineFromJson(Map<String, dynamic> json) {
	final CartoonModelDataFeedsCombine cartoonModelDataFeedsCombine = CartoonModelDataFeedsCombine();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		cartoonModelDataFeedsCombine.id = id;
	}
	final String? title = jsonConvert.convert<String>(json['title']);
	if (title != null) {
		cartoonModelDataFeedsCombine.title = title;
	}
	final String? subtitle = jsonConvert.convert<String>(json['subtitle']);
	if (subtitle != null) {
		cartoonModelDataFeedsCombine.subtitle = subtitle;
	}
	final int? booknum = jsonConvert.convert<int>(json['booknum']);
	if (booknum != null) {
		cartoonModelDataFeedsCombine.booknum = booknum;
	}
	final int? period = jsonConvert.convert<int>(json['period']);
	if (period != null) {
		cartoonModelDataFeedsCombine.period = period;
	}
	final List<dynamic>? books = jsonConvert.convertListNotNull<dynamic>(json['books']);
	if (books != null) {
		cartoonModelDataFeedsCombine.books = books;
	}
	return cartoonModelDataFeedsCombine;
}

Map<String, dynamic> $CartoonModelDataFeedsCombineToJson(CartoonModelDataFeedsCombine entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['title'] = entity.title;
	data['subtitle'] = entity.subtitle;
	data['booknum'] = entity.booknum;
	data['period'] = entity.period;
	data['books'] =  entity.books;
	return data;
}

CartoonModelDataFeedsRank $CartoonModelDataFeedsRankFromJson(Map<String, dynamic> json) {
	final CartoonModelDataFeedsRank cartoonModelDataFeedsRank = CartoonModelDataFeedsRank();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		cartoonModelDataFeedsRank.id = id;
	}
	final String? title = jsonConvert.convert<String>(json['title']);
	if (title != null) {
		cartoonModelDataFeedsRank.title = title;
	}
	final String? description = jsonConvert.convert<String>(json['description']);
	if (description != null) {
		cartoonModelDataFeedsRank.description = description;
	}
	final List<dynamic>? data = jsonConvert.convertListNotNull<dynamic>(json['data']);
	if (data != null) {
		cartoonModelDataFeedsRank.data = data;
	}
	return cartoonModelDataFeedsRank;
}

Map<String, dynamic> $CartoonModelDataFeedsRankToJson(CartoonModelDataFeedsRank entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['title'] = entity.title;
	data['description'] = entity.description;
	data['data'] =  entity.data;
	return data;
}

CartoonModelDataFeedsIpProduct $CartoonModelDataFeedsIpProductFromJson(Map<String, dynamic> json) {
	final CartoonModelDataFeedsIpProduct cartoonModelDataFeedsIpProduct = CartoonModelDataFeedsIpProduct();
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		cartoonModelDataFeedsIpProduct.id = id;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		cartoonModelDataFeedsIpProduct.name = name;
	}
	final List<dynamic>? products = jsonConvert.convertListNotNull<dynamic>(json['products']);
	if (products != null) {
		cartoonModelDataFeedsIpProduct.products = products;
	}
	final bool? newProduct = jsonConvert.convert<bool>(json['new_product']);
	if (newProduct != null) {
		cartoonModelDataFeedsIpProduct.newProduct = newProduct;
	}
	return cartoonModelDataFeedsIpProduct;
}

Map<String, dynamic> $CartoonModelDataFeedsIpProductToJson(CartoonModelDataFeedsIpProduct entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['name'] = entity.name;
	data['products'] =  entity.products;
	data['new_product'] = entity.newProduct;
	return data;
}

CartoonModelDataFeedsNovelInfo $CartoonModelDataFeedsNovelInfoFromJson(Map<String, dynamic> json) {
	final CartoonModelDataFeedsNovelInfo cartoonModelDataFeedsNovelInfo = CartoonModelDataFeedsNovelInfo();
	final int? numbers = jsonConvert.convert<int>(json['numbers']);
	if (numbers != null) {
		cartoonModelDataFeedsNovelInfo.numbers = numbers;
	}
	return cartoonModelDataFeedsNovelInfo;
}

Map<String, dynamic> $CartoonModelDataFeedsNovelInfoToJson(CartoonModelDataFeedsNovelInfo entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['numbers'] = entity.numbers;
	return data;
}